#include<iostream>
using namespace std;
int arr[10001];
int crr[10001];
int brr[10001];
int main()
{
	int n, d;
	cin >> n >> d;
	for (int i = 0; i < n; i++)
	{
		cin >> arr[i];	
		brr[i] = arr[i];
	}
	int max = arr[0];
	int min = arr[0];
	for (int i = 1; i < n; i++)
	{
		if (arr[i] > max)
		{
			max = arr[i];
		}
		if (arr[i] < min)
		{
			min = arr[i];
		}
		if (arr[i]<max)
		{
			arr[i] = max+ d;
		}
	}
	for (int i = 0; i < n; i++)
	{
		cout << arr[i] << " ";
	}
	return 0;
}